#include "sdl.h"

#include <qrcutil.h>

SDL::SDL() {
    m_list = QR("://SDL.txt").split("\n", Qt::SkipEmptyParts);
}

QString SDL::name()
{
    return "SDL";
}

QString SDL::prefix()
{
    return "https://wiki.libsdl.org/";
}

QStringList SDL::searching(const QString &text)
{
    QStringList list;

    foreach (auto var, m_list) {
        if (text.isEmpty() || var.contains(text, Qt::CaseInsensitive)) {
            list << var;
        }
    }

    return list;
}

QString SDL::content(const QString &text)
{
    return prefix() + text;
}
